package com.banggood.upms.dao;

import com.banggood.upms.bean.po.TreePermission;
import com.banggood.upms.bean.vo.TreePermissionVo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface TreePermissionDao extends BaseDao<TreePermission>{

    /**
     * 根据系统ID跟树节点ID,删除这个树节点所分配的权限
     * @param vo
     * @return
     */
    int deleteAll(TreePermissionVo vo);

    /**
     * 根据传入的权限ID集合,删除所有分配了这些权限的tree-perm映射
     * @param ids
     * @return 删除数目
     */
    int deleteAssignedTreePermByPermIds(List<String> ids);
}